template(name="dueCardsHeaderBar")
  if currentUser
    h1
      | 📅
      | {{_ 'dueCards-title'}}

    .board-header-btns.left
      a.board-header-btn.js-due-cards-view-change(title="{{_ 'dueCardsViewChange-title'}}")
        | ▼
        if $eq dueCardsView 'me'
          | 👤
          | {{_ 'dueCardsViewChange-choice-me'}}
        if $eq dueCardsView 'all'
          | 👥
          | {{_ 'dueCardsViewChange-choice-all'}}

template(name="dueCardsModalTitle")
  if currentUser
    h2
      | ⌨️
      | {{_ 'dueCards-title'}}

template(name="dueCards")
  if currentUser
    if searching.get
      +spinner
    else if hasResults.get
      .global-search-results-list-wrapper
        if hasQueryErrors.get
          div
            each msg in errorMessages
              span.global-search-error-messages
                = msg
        else
          .due-cards-results-header
            h1
              = resultsText
          each card in dueCardsList
            +resultCard(card)
    else
      .global-search-results-list-wrapper
        .no-results
          h3 {{_ 'dueCards-noResults-title'}}
          p {{_ 'dueCards-noResults-description'}}

template(name="dueCardsViewChangePopup")
  if currentUser
    ul.pop-over-list
      li
        with "dueCardsViewChange-choice-me"
          a.js-due-cards-view-me
            | 👤
            | {{_ 'dueCardsViewChange-choice-me'}}
            if $eq Utils.dueCardsView "me"
              | ✅
      hr
      li
        with "dueCardsViewChange-choice-all"
          a.js-due-cards-view-all
            | 👥
            | {{_ 'dueCardsViewChange-choice-all'}}
            span.sub-name
              +viewer
                | {{_ 'dueCardsViewChange-choice-all-description' }}
            if $eq Utils.dueCardsView "all"
              | ✅
